package com.rainbow.support.mybatis.properties;
import com.baomidou.mybatisplus.annotation.DbType;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;


/**
 * 客户端认证配置
 * @author 付为地
 */
@Data
@NoArgsConstructor
@ConfigurationProperties(prefix = MybatisExtraProperties.PREFIX)
public class MybatisExtraProperties {

    public static final String PREFIX = "rainbow.extra.mybatis.plus";

    public static final String  PLUS_INTERCEPTOR_SPEL= "${rainbow.extra.mybatis.plus.pageable:true}";

    public static final String  PLUS_META_OBJECT_HANDLER_SPEL= "${rainbow.extra.mybatis.plus.extrable:true}";

    /**
     * 是否开启增强
     */
    private boolean enable = true;

    /**
     * 是否分页
     */
    private boolean pageable = false;


    /**
     * 是否属性注入
     */
    private boolean extrable = true;

    /**
     * 攻击 SQL 阻断解析器
     */
    private boolean blockAttack = false;


    /**
     * 是否启用数据权限
     */
    private boolean dataScope = true;


    private boolean illegalSql = false;

    private DbType dbType = DbType.MYSQL;


    /**
     * 单页分页条数限制(默认无限制,参见 插件#handlerLimit 方法)
     */
    private long maxLimit = 1000L;



}
